﻿
/*----------------------------------------------------------------//
// 文件名：MoAssessStandard.cs
// 文件功能描述：实体 MoAssessStandard.
// 
// 创建标识：Template  ver 5.0.20090429 2009-07-12
//
// 修改标识：
// 修改描述：
//----------------------------------------------------------------*/
#region MoAssessStandard
using System;
using System.Data;
namespace Las.Model
{
	/// <summary>
	/// 业务实体MoAssessStandard
	/// </summary>
	public partial class MoAssessStandard:ICloneable
	{
		#region 表AssessStandard的字段
		private string assStdId;
		private string assStdGroupId;
		private string a;
		private int aRowspan;
		private int aColspan;
		private int b;
		private int bRowspan;
		private int bColspan;
		private string c;
		private int cRowspan;
		private int cColspan;
		private int d;
		private int dRowspan;
		private int dColspan;
		private string assPoint;
		private int apScore;
		private string basicStandard;
		private string implementation;
		private string rem;
		private int assTarget;
		private int calType;
		private string class1;
		private string class2;
		#endregion
		
		#region 构造函数
		public MoAssessStandard()
		{
			                        	    
		   
		}
		#endregion
		
		#region 拷贝构造函数

		public MoAssessStandard(MoAssessStandard item)
		{
			item.CopyTo(this);
		}
		#endregion
		
		#region 带参数构造函数
	    public MoAssessStandard(string assStdId,string assStdGroupId,string a,int aRowspan,int aColspan,int b,int bRowspan,int bColspan,string c,int cRowspan,int cColspan,int d,int dRowspan,int dColspan,string assPoint,int apScore,string basicStandard,string implementation,string rem,int assTarget,int calType,string class1,string class2)
		{
		this.assStdId=assStdId;
		this.assStdGroupId=assStdGroupId;
		this.a=a;
		this.aRowspan=aRowspan;
		this.aColspan=aColspan;
		this.b=b;
		this.bRowspan=bRowspan;
		this.bColspan=bColspan;
		this.c=c;
		this.cRowspan=cRowspan;
		this.cColspan=cColspan;
		this.d=d;
		this.dRowspan=dRowspan;
		this.dColspan=dColspan;
		this.assPoint=assPoint;
		this.apScore=apScore;
		this.basicStandard=basicStandard;
		this.implementation=implementation;
		this.rem=rem;
		this.assTarget=assTarget;
		this.calType=calType;
		this.class1=class1;
		this.class2=class2;
		}
		#endregion
		
		#region 表AssessStandard的字段属性
		/// <summary>
		/// ASS_STD_ID
		/// </summary>
		public string AssStdId
		{
			get {return assStdId;}
			set {assStdId=value;}
		}
		/// <summary>
		///来自编码定义表。当维护标准时，这些标准项必须是某个组的。
		/// </summary>
		public string AssStdGroupId
		{
			get {return assStdGroupId;}
			set {assStdGroupId=value;}
		}
		/// <summary>
		///可能是人的ID，也可能是单位的ID。
		/// </summary>
		public string A
		{
			get {return a;}
			set {a=value;}
		}
		/// <summary>
		/// A_ROWSPAN
		/// </summary>
		public int ARowspan
		{
			get {return aRowspan;}
			set {aRowspan=value;}
		}
		/// <summary>
		/// A_COLSPAN
		/// </summary>
		public int AColspan
		{
			get {return aColspan;}
			set {aColspan=value;}
		}
		/// <summary>
		/// B
		/// </summary>
		public int B
		{
			get {return b;}
			set {b=value;}
		}
		/// <summary>
		/// B_ROWSPAN
		/// </summary>
		public int BRowspan
		{
			get {return bRowspan;}
			set {bRowspan=value;}
		}
		/// <summary>
		/// B_COLSPAN
		/// </summary>
		public int BColspan
		{
			get {return bColspan;}
			set {bColspan=value;}
		}
		/// <summary>
		/// C
		/// </summary>
		public string C
		{
			get {return c;}
			set {c=value;}
		}
		/// <summary>
		/// C_ROWSPAN
		/// </summary>
		public int CRowspan
		{
			get {return cRowspan;}
			set {cRowspan=value;}
		}
		/// <summary>
		/// C_COLSPAN
		/// </summary>
		public int CColspan
		{
			get {return cColspan;}
			set {cColspan=value;}
		}
		/// <summary>
		/// D
		/// </summary>
		public int D
		{
			get {return d;}
			set {d=value;}
		}
		/// <summary>
		/// D_ROWSPAN
		/// </summary>
		public int DRowspan
		{
			get {return dRowspan;}
			set {dRowspan=value;}
		}
		/// <summary>
		/// D_COLSPAN
		/// </summary>
		public int DColspan
		{
			get {return dColspan;}
			set {dColspan=value;}
		}
		/// <summary>
		/// ASS_POINT
		/// </summary>
		public string AssPoint
		{
			get {return assPoint;}
			set {assPoint=value;}
		}
		/// <summary>
		/// AP_SCORE
		/// </summary>
		public int ApScore
		{
			get {return apScore;}
			set {apScore=value;}
		}
		/// <summary>
		/// BASIC_STANDARD
		/// </summary>
		public string BasicStandard
		{
			get {return basicStandard;}
			set {basicStandard=value;}
		}
		/// <summary>
		/// IMPLEMENTATION
		/// </summary>
		public string Implementation
		{
			get {return implementation;}
			set {implementation=value;}
		}
		/// <summary>
		/// REM
		/// </summary>
		public string Rem
		{
			get {return rem;}
			set {rem=value;}
		}
		/// <summary>
		///0表示无需选择抽考对象，直接填写。1表示该项目选人，2表示该项目要选单位，3表示该项目要选单位和人。  
		/// </summary>
		public int AssTarget
		{
			get {return assTarget;}
			set {assTarget=value;}
		}
		/// <summary>
		///0=无需计算，此时抽考对象字段必须是0，1=由抽考的所有人（单位）的所有课目的成绩计算而得；2=由单位单科目成绩计算而得   3=由抽考的所有人，计算出单位的成绩，再用这些单位的成绩，计算出一个项的成绩。
		/// </summary>
		public int CalType
		{
			get {return calType;}
			set {calType=value;}
		}
		/// <summary>
		/// CLASS1
		/// </summary>
		public string Class1
		{
			get {return class1;}
			set {class1=value;}
		}
		/// <summary>
		/// CLASS2
		/// </summary>
		public string Class2
		{
			get {return class2;}
			set {class2=value;}
		}
		#endregion
		
		#region 辅助函数
		/// <summary>
		/// 拷贝函数
		/// </summary>
		public MoAssessStandard CopyTo(MoAssessStandard item)
        {
		    item.assStdId=this.assStdId;
		    item.assStdGroupId=this.assStdGroupId;
		    item.a=this.a;
		    item.aRowspan=this.aRowspan;
		    item.aColspan=this.aColspan;
		    item.b=this.b;
		    item.bRowspan=this.bRowspan;
		    item.bColspan=this.bColspan;
		    item.c=this.c;
		    item.cRowspan=this.cRowspan;
		    item.cColspan=this.cColspan;
		    item.d=this.d;
		    item.dRowspan=this.dRowspan;
		    item.dColspan=this.dColspan;
		    item.assPoint=this.assPoint;
		    item.apScore=this.apScore;
		    item.basicStandard=this.basicStandard;
		    item.implementation=this.implementation;
		    item.rem=this.rem;
		    item.assTarget=this.assTarget;
		    item.calType=this.calType;
		    item.class1=this.class1;
		    item.class2=this.class2;
			return item;
        }
		/// <summary>
		/// 克隆函数
		/// </summary>		
		public object Clone()
        {
            MoAssessStandard mo=new MoAssessStandard();
		    mo.AssStdId=this.AssStdId;
		    mo.AssStdGroupId=this.AssStdGroupId;
		    mo.A=this.A;
		    mo.ARowspan=this.ARowspan;
		    mo.AColspan=this.AColspan;
		    mo.B=this.B;
		    mo.BRowspan=this.BRowspan;
		    mo.BColspan=this.BColspan;
		    mo.C=this.C;
		    mo.CRowspan=this.CRowspan;
		    mo.CColspan=this.CColspan;
		    mo.D=this.D;
		    mo.DRowspan=this.DRowspan;
		    mo.DColspan=this.DColspan;
		    mo.AssPoint=this.AssPoint;
		    mo.ApScore=this.ApScore;
		    mo.BasicStandard=this.BasicStandard;
		    mo.Implementation=this.Implementation;
		    mo.Rem=this.Rem;
		    mo.AssTarget=this.AssTarget;
		    mo.CalType=this.CalType;
		    mo.Class1=this.Class1;
		    mo.Class2=this.Class2;
			return mo;
		}
				///<summary>
		///判断对象是否相等
		///<summary>
		public override bool Equals(object obj)
        {		 
            if (object.ReferenceEquals(this,obj))
            {
                return true;
            }
            else
            {
                MoAssessStandard NewAssessStandard = obj as MoAssessStandard;
                if (NewAssessStandard == null)
                {
                    return false;
                }
                else
                {
				if (NewAssessStandard.AssStdId==this.AssStdId && NewAssessStandard.AssStdGroupId==this.AssStdGroupId && NewAssessStandard.A==this.A && NewAssessStandard.ARowspan==this.ARowspan && NewAssessStandard.AColspan==this.AColspan && NewAssessStandard.B==this.B && NewAssessStandard.BRowspan==this.BRowspan && NewAssessStandard.BColspan==this.BColspan && NewAssessStandard.C==this.C && NewAssessStandard.CRowspan==this.CRowspan && NewAssessStandard.CColspan==this.CColspan && NewAssessStandard.D==this.D && NewAssessStandard.DRowspan==this.DRowspan && NewAssessStandard.DColspan==this.DColspan && NewAssessStandard.AssPoint==this.AssPoint && NewAssessStandard.ApScore==this.ApScore && NewAssessStandard.BasicStandard==this.BasicStandard && NewAssessStandard.Implementation==this.Implementation && NewAssessStandard.Rem==this.Rem && NewAssessStandard.AssTarget==this.AssTarget && NewAssessStandard.CalType==this.CalType && NewAssessStandard.Class1==this.Class1 && NewAssessStandard.Class2==this.Class2)		
					{
                        return true; 
                    }
                }

            }
            return false;
            
        }
		///TODO:you should modify GetHashCode by yourself.
		public override int GetHashCode()
		{
			return base.GetHashCode();
		} 

		public override string ToString()
        {
		   return String.Format(System.Globalization.CultureInfo.InvariantCulture,"AssStdId={0}/AssStdGroupId={1}/A={2}/ARowspan={3}/AColspan={4}/B={5}/BRowspan={6}/BColspan={7}/C={8}/CRowspan={9}/CColspan={10}/D={11}/DRowspan={12}/DColspan={13}/AssPoint={14}/ApScore={15}/BasicStandard={16}/Implementation={17}/Rem={18}/AssTarget={19}/CalType={20}/Class1={21}/Class2={22}",assStdId,assStdGroupId,a,aRowspan,aColspan,b,bRowspan,bColspan,c,cRowspan,cColspan,d,dRowspan,dColspan,assPoint,apScore,basicStandard,implementation,rem,assTarget,calType,class1,class2);
		 
		}
		#endregion
		
		
		#region DataTable Help Function
		///<summary>
		///DataRow转换成Model
		///</summary>
		public void Row2Model(DataRow row)
		{
		    if(row["Ass_Std_ID"]!=null && row["Ass_Std_ID"]!=DBNull.Value)
			{
			    this.AssStdId = (string)row["Ass_Std_ID"];
			}
			else
			{
				this.AssStdId =string.Empty;
			}
		    if(row["Ass_Std_Group_ID"]!=null && row["Ass_Std_Group_ID"]!=DBNull.Value)
			{
			    this.AssStdGroupId = (string)row["Ass_Std_Group_ID"];
			}
			else
			{
				this.AssStdGroupId =string.Empty;
			}
		    if(row["A"]!=null && row["A"]!=DBNull.Value)
			{
			    this.A = (string)row["A"];
			}
			else
			{
				this.A =string.Empty;
			}
		    if(row["A_Rowspan"]!=null && row["A_Rowspan"]!=DBNull.Value)
			{
			    this.ARowspan = (int)row["A_Rowspan"];
			}
			else
			{
				this.ARowspan =0;
			}
		    if(row["A_Colspan"]!=null && row["A_Colspan"]!=DBNull.Value)
			{
			    this.AColspan = (int)row["A_Colspan"];
			}
			else
			{
				this.AColspan =0;
			}
		    if(row["B"]!=null && row["B"]!=DBNull.Value)
			{
			    this.B = (int)row["B"];
			}
			else
			{
				this.B =0;
			}
		    if(row["B_Rowspan"]!=null && row["B_Rowspan"]!=DBNull.Value)
			{
			    this.BRowspan = (int)row["B_Rowspan"];
			}
			else
			{
				this.BRowspan =0;
			}
		    if(row["B_Colspan"]!=null && row["B_Colspan"]!=DBNull.Value)
			{
			    this.BColspan = (int)row["B_Colspan"];
			}
			else
			{
				this.BColspan =0;
			}
		    if(row["C"]!=null && row["C"]!=DBNull.Value)
			{
			    this.C = (string)row["C"];
			}
			else
			{
				this.C =string.Empty;
			}
		    if(row["C_Rowspan"]!=null && row["C_Rowspan"]!=DBNull.Value)
			{
			    this.CRowspan = (int)row["C_Rowspan"];
			}
			else
			{
				this.CRowspan =0;
			}
		    if(row["C_Colspan"]!=null && row["C_Colspan"]!=DBNull.Value)
			{
			    this.CColspan = (int)row["C_Colspan"];
			}
			else
			{
				this.CColspan =0;
			}
		    if(row["D"]!=null && row["D"]!=DBNull.Value)
			{
			    this.D = (int)row["D"];
			}
			else
			{
				this.D =0;
			}
		    if(row["D_Rowspan"]!=null && row["D_Rowspan"]!=DBNull.Value)
			{
			    this.DRowspan = (int)row["D_Rowspan"];
			}
			else
			{
				this.DRowspan =0;
			}
		    if(row["D_Colspan"]!=null && row["D_Colspan"]!=DBNull.Value)
			{
			    this.DColspan = (int)row["D_Colspan"];
			}
			else
			{
				this.DColspan =0;
			}
		    if(row["Ass_Point"]!=null && row["Ass_Point"]!=DBNull.Value)
			{
			    this.AssPoint = (string)row["Ass_Point"];
			}
			else
			{
				this.AssPoint =string.Empty;
			}
		    if(row["Ap_Score"]!=null && row["Ap_Score"]!=DBNull.Value)
			{
			    this.ApScore = (int)row["Ap_Score"];
			}
			else
			{
				this.ApScore =0;
			}
		    if(row["Basic_Standard"]!=null && row["Basic_Standard"]!=DBNull.Value)
			{
			    this.BasicStandard = (string)row["Basic_Standard"];
			}
			else
			{
				this.BasicStandard =string.Empty;
			}
		    if(row["Implementation"]!=null && row["Implementation"]!=DBNull.Value)
			{
			    this.Implementation = (string)row["Implementation"];
			}
			else
			{
				this.Implementation =string.Empty;
			}
		    if(row["Rem"]!=null && row["Rem"]!=DBNull.Value)
			{
			    this.Rem = (string)row["Rem"];
			}
			else
			{
				this.Rem =string.Empty;
			}
		    if(row["Ass_Target"]!=null && row["Ass_Target"]!=DBNull.Value)
			{
			    this.AssTarget = (int)row["Ass_Target"];
			}
			else
			{
				this.AssTarget =0;
			}
		    if(row["Cal_Type"]!=null && row["Cal_Type"]!=DBNull.Value)
			{
			    this.CalType = (int)row["Cal_Type"];
			}
			else
			{
				this.CalType =0;
			}
		    if(row["Class1"]!=null && row["Class1"]!=DBNull.Value)
			{
			    this.Class1 = (string)row["Class1"];
			}
			else
			{
				this.Class1 =string.Empty;
			}
		    if(row["Class2"]!=null && row["Class2"]!=DBNull.Value)
			{
			    this.Class2 = (string)row["Class2"];
			}
			else
			{
				this.Class2 =string.Empty;
			}
		}
		
		///<summary>
		///Model转换成DataRow
		///</summary>
	　　public void Model2Row(DataRow row)
		{
			row["Ass_Std_ID"] = this.AssStdId;
			row["Ass_Std_Group_ID"] = this.AssStdGroupId;
			row["A"] = this.A;
			row["A_Rowspan"] = this.ARowspan;
			row["A_Colspan"] = this.AColspan;
			row["B"] = this.B;
			row["B_Rowspan"] = this.BRowspan;
			row["B_Colspan"] = this.BColspan;
			row["C"] = this.C;
			row["C_Rowspan"] = this.CRowspan;
			row["C_Colspan"] = this.CColspan;
			row["D"] = this.D;
			row["D_Rowspan"] = this.DRowspan;
			row["D_Colspan"] = this.DColspan;
			row["Ass_Point"] = this.AssPoint;
			row["Ap_Score"] = this.ApScore;
			row["Basic_Standard"] = this.BasicStandard;
			row["Implementation"] = this.Implementation;
			row["Rem"] = this.Rem;
			row["Ass_Target"] = this.AssTarget;
			row["Cal_Type"] = this.CalType;
			row["Class1"] = this.Class1;
			row["Class2"] = this.Class2;
		}
		#endregion
	}
}
#endregion
